#ifndef APP_INTENT_H
#define APP_INTENT_H
#include <string>
#include <map>

using namespace std;

class SaveJson;
class Intent
{
public:
    Intent();
    ~Intent();
    void putExtra(string key, string value);
    void putExtra(string key, int value);
    void putExtra(string key, double value);
    void putExtra(string key, bool value);

    bool getExtraString(string key, string& value);
    bool getExtraInt(string key, int& value);
    bool getExtraDouble(string key, double& value);
    bool getExtraBool(string key, bool& value);

    string getExtraStringDefault(string key, string defaultValue);
    int getExtraIntDefault(string key, int defaultValue);
    double getExtraDoubleDefault(string key, double defaultValue);
    bool getExtraBoolDefault(string key, bool defaultValue);
public:
    friend class SaveJson;
    friend class SaveTinyXml2;
protected:
    map<string, string> m_extra_s;
    map<string, int> m_extra_i;
    map<string, double> m_extra_d;
    map<string, bool> m_extra_b;
};

#endif // INTENT_H
